import request from "@/utils/request";

// 修改访客雷达分组排序
export function sortRadarCategory(params) {
  return request({
    url: '/admin/visitorRadar/sortRadarCategory',
    method: 'post',
    data: params,
  })
}

// 删除雷达前校验
export function queryRadarCount(params) {
  return request({
    url: '/admin/visitorRadar/queryRadarCount',
    method: 'get',
    params,
  })
}

export function queryAccountCount(params) {
  return request({
    url: '/admin/automate/queryAccountCount',
    method: 'get',
    params,
  })
}

// 迁移删除的雷达分组
export function delRadarCategory(params) {
  return request({
    // url: '/admin/visitorRadar/delRadarCategory',
    url: '/admin/automate/delAccountCategory',
    method: 'post',
    data: params,
  })
}

// 列表查询
export function automateList(data) {
  return request({
    url: '/admin/automate/list',
    method: 'post',
    data,
    params: {
      pageNum: data.pageNum,
      pageSize: data.pageSize
    }
  })
}

// 编辑分组
export function updateCategory(data) {
  return request({
    url: '/admin/automate/updateCategory',
    method: 'post',
    data,
  })
}

// 编辑分组
export function bindAccount(data) {
  return request({
    url: '/admin/automate/bindAccount',
    method: 'post',
    data,
  })
}

// 获取二维码
export function automateSan(params) {
  return request({
    url: '/admin/automate/scan',
    method: 'get',
    params,
  })
}

// 登录
export function sign(data) {
  return request({
    url: '/admin/automate/sign',
    method: 'post',
    data
  })
}

// 登录
export function downline(data) {
  return request({
    url: '/admin/automate/downline',
    method: 'post',
    data
  })
}

// 删除
export function automateDelete(params) {
  return request({
    url: '/admin/automate/delete',
    method: 'get',
    params
  })
}

// 删除
export function updateManger(params) {
  return request({
    url: '/admin/automate/updateManger',
    method: 'get',
    params
  })
}

export function synchronization(params) {
  return request({
    url: '/admin/automate/synchronization',
    method: 'get',
    params
  })
}
